// config/constants.js
// 常量定义

// 颜色常量
export const COLORS = {
  PRIMARY: '#1aad19',
  SUCCESS: '#4caf50',
  WARNING: '#ff9800',
  DANGER: '#ff5722',
  INFO: '#2196f3',
  
  TEXT_PRIMARY: '#333',
  TEXT_SECONDARY: '#666',
  TEXT_HINT: '#999',
  
  BACKGROUND: '#f5f5f5',
  BORDER: '#eee'
}

// 字体大小
export const FONT_SIZES = {
  SMALL: 24,
  NORMAL: 28,
  MEDIUM: 32,
  LARGE: 36,
  XLARGE: 48
}

// 间距
export const SPACING = {
  SMALL: 20,
  MEDIUM: 30,
  LARGE: 40
}

// 正则表达式
export const REGEX = {
  PHONE: /^1[3-9]\d{9}$/,
  EMAIL: /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}$/,
  PASSWORD: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{8,}$/
}

// 消息提示
export const MESSAGES = {
  NETWORK_ERROR: '网络连接失败，请检查网络设置',
  REQUEST_TIMEOUT: '请求超时，请稍后重试',
  SERVER_ERROR: '服务器错误，请稍后重试',
  LOGIN_EXPIRED: '登录已过期，请重新登录',
  OPERATION_SUCCESS: '操作成功',
  OPERATION_FAILED: '操作失败',
  LOADING: '加载中...',
  SUBMITTING: '提交中...'
}

// 路由路径
export const ROUTES = {
  // 公共页面
  LOGIN: '/pages/login/login',
  
  // 学生端
  STUDENT_HOME: '/pages/student/home/home',
  STUDENT_COURSE_SQUARE: '/pages/student/course-square/course-square',
  STUDENT_COURSE_DETAIL: '/pages/student/course-detail/course-detail',
  STUDENT_MY_COURSE: '/pages/student/my-course/my-course',
  STUDENT_LIVE_ROOM: '/pages/student/live-room/live-room',
  STUDENT_PROFILE: '/pages/student/profile/profile',
  
  // 讲师端
  TEACHER_HOME: '/pages/teacher/home/home',
  TEACHER_MY_COURSES: '/pages/teacher/my-courses/my-courses',
  TEACHER_LIVE_ROOM: '/pages/teacher/live-room/live-room',
  TEACHER_PROFILE: '/pages/teacher/profile/profile'
}
